<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改日报')"/>
<!--    <th:block th:include="include :: select2-css"/>-->
</head>
<body>
<div class="main-content">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-report-edit" th:object="${editReport}">
            <h4 class="form-header h4">更新日报</h4>
            <input name="reportId"  type="hidden"  th:field="*{reportId}" />
            <div class="form-group">
                <label class="col-sm-2 control-label is-required">名字：</label>
                <div class="col-sm-10">
                    <input name="staffName" th:placeholder="*{staffName}" class="form-control" type="text" maxlength="30" th:field="*{staffName}" id="sname">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label ">岗位：</label>
                <div class="col-sm-10">
                    <input name="staffStation" th:placeholder="*{staffStation}" class="form-control" type="text" maxlength="30" th:field="*{staffStation}" id="sstaion">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">今日计划：</label>
                <div class="col-sm-10">
                    <input name="todayPlan" class="form-control" type="text" maxlength="30" th:field="*{todayPlan}" id="splan" readonly>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-xs-2 control-label">已完成事项：</label>
                        <div class="col-xs-10">
                            <textarea name="finishWork" maxlength="500" class="form-control" rows="5" th:field="*{finishWork}"></textarea>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-xs-2 control-label">未完成事项：</label>
                        <div class="col-xs-10">
                            <textarea name="notDoWork" maxlength="500" class="form-control" rows="5" th:field="*{notDoWork}"></textarea>
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">工作进度：</label>
                <div class="col-sm-10">
                    <input name="staffProgress" class="form-control" type="text" maxlength="30" th:field="*{staffProgress}" id="sprogress" value="50" oninput="value=value.replace(/(^\.|[^\d\.])/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.').replace(/^\d{3,}.*/,'100')+'%'">
                </div>
            </div>
        </form>
    </div>
</div>
<div class="row">
    <div class="col-sm-offset-5 col-sm-10">
        <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存
        </button>&nbsp;
        <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭
        </button>
    </div>
</div>
<th:block th:include="include :: footer"/>
<!--<th:block th:include="include :: select2-js"/>-->
<script type="text/javascript">
    var prefix = ctx + "system/report";

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-report-edit').serialize());
        }
    }
</script>
</body>
</html>